\subsubsection{Phase1: Identify Regions}
\paragraph{Purpose}
Most MPI programs written in C-like languages have the same properties when it comes to laying out the code.  There is a  declaration section, a computation section and an exception handling section.  We will ignore the exception handling and focus on the other sections. 

\paragraph {In/Out}
Our input will be the original MPI source code, that meats the following requirements.  
\begin{enumerate}
\item There is clear code that follows a tradition a pattern 
\item The code contains no unusual data structures 
\item The code has no recursion 
\end{enumerate}//

Our output will be that source code with regions of that code identified using standard C comments with 5 slashes and a begin and end tag.  
	

\paragraph{Meta Algoritm}
Major regions of the code will be identified and marked by inserting a line before and after the code with a five slash chevron.

\begin{description}
\item [Step 1] Identify and mark  preprocessor directives 
Starts with \#include


\item [Step 2] Identify and mark declarations/Initializations 
This can be done easily by the key words at the beginning of lines
Initializations are identified by the first use of the variables.  


\item [Step 3] Identify and mark MPI initialization section
This is from a standard set of MPI initialization calls.

\item [Step 4] Identify and mark Computation
First Identify the main function, and mark as MAIN.  
Any stand alone functions will be computation, as well as where the functions are called.
Code with MPI Send/Recv is computation.
Code with loops is computation.

\end{description}




\paragraph{Sample Code}

Some text goes here

\begin{center}
\begin{fminipage}[t]{0.45\linewidth}
\begin{center}Input Code Block
\rule{0.75\textwidth}{1pt}
\end{center}
\begin{cudablock}
#include <stdio>
#include <mpi.h>
\end{cudablock} 
\end{fminipage}
\hspace{0.05cm}
\begin{fminipage}[t]{0.45\linewidth}
\begin{center}Output Code Block
\rule{0.75\textwidth}{1pt}
\end{center}
\begin{cudablock}
///// Preproc 
#include <stdio>
#include <mpi.h>
///// *Preproc 
\end{cudablock} 
\end{fminipage}
\end{center}



%\input{tabs/tab-algorithm_phase1.tex}




